#唐门优测
#道长最帅666
""
"""
@pytest.mark.skip:跳过该条测试用例
用法：@pytest.mark.skip(reason=none)
reason:原因（将会被输出）
@pytest.mark.skipif:跳过符合条件的测试用例
用法：@pytest.mark.skipif(condition，reason=none)
condition:跳过此条用例的条件
reason:原因（将会被输出）

区别：
@pytest.mark.skip:无差别跳过，只要用这个mark就跳过
@pytest.mark.skipif：符合条件的才跳过
"""

import pytest
con = "跳过条件"
@pytest.mark.skip("这条是skip，无差别跳过")
def test_skip():
    assert 1 == 1

@pytest.mark.skipif(con == "跳过条件",reason="skipif有条件的跳过")
def test_skipif():
    assert 1 == 1

@pytest.mark.skipif(con == "不符合",reason="skipif不符合条件的执行")
def test_noskipif():
    assert 2 == 2

if __name__ == '__main__':
    pytest.main()





